public class code1 {
    public void moveZeroes(int[] nums) {
        int cur=0,dest=-1;
        while(cur<nums.length) {
            if(nums[cur]!=0) {
                dest++;
                int tmp = nums[cur];
                nums[cur] = nums[dest];
                nums[dest] = tmp;

            }
            cur++;
        }
    }
}
